<template>
  <div class="home">
<!--    <div class="select">国内疫情</div>-->
   <HotView :hotArr="hotArr" />
    <DataStatistics :dataObj="dataObj" />
    <EpidemicPolicy/>
<!--    中国疫情地图-->
    <EpidemicMap/>
<!--    世界疫情地图-->
    <WorldMap/>
<!--    轮播图-->
    <EpidemicSwiper/>
<!--    城市跳转-->
  </div>
</template>

<script>
import HotView from "@/components/hot/HotView";
import DataStatistics from "@/components/data/DataStatistics";
import EpidemicPolicy from "@/components/policy/EpidemicPolicy";
import EpidemicMap from "@/components/map/EpidemicMap";
import WorldMap from "@/components/map/WorldMap";
import api from '@/api/index'
import EpidemicSwiper from "@/components/swiper/EpidemicSwiper";
export default {
  data(){
   return{
     hotArr:[],
     dataObj:{}
   }
  },
  components:{
    HotView,
    DataStatistics,
    EpidemicPolicy,
    EpidemicMap,
    WorldMap,
    EpidemicSwiper
  },
  created() {
// 请求疫情热点接口
    api.getCovHot()
      .then(res=>{
        // console.log(res)
        var data=res.data.newslist[0]
        this.hotArr=data.news
        this.dataObj=data.desc
        // console.log(this.hotArr)
      })
  }
}
</script>
<style scoped lang="less">
.home{
}
</style>
